package com.after.saas.common.model.vo;

import com.after.saas.common.constants.SortEnum;
import com.after.saas.common.validate.EnumValue;
import com.after.saas.common.validate.Group;
import lombok.Data;
import org.springframework.validation.annotation.Validated;

import javax.validation.constraints.NotBlank;

/**
 * @Classname ValidDemo
 * @Description TODO
 * @auth after
 * @since 2022/11/5 11:02
 */

@Data
@Validated
public class ValidDemo {

    @NotBlank(message = "sort不能为空")
    @EnumValue(value = SortEnum.class, method = "getSort")
    private String sort;
    @NotBlank(message = "info不能为空",groups = Group.UpdateGroup.class)
    private String info;

}
